package code.structure.manager.assist
{
	import code.structure.manager.pop.WindowManager;
	import code.structure.module.others.ProjectAssistController;

	/**
	 *全局项目辅助管理器 需要有controller(声音 统计 弹框 js等 而不单独做处理)
	 * @author Yuri
	 * 
	 */
	public class ProjectAssistManager
	{
		private static var _instance:ProjectAssistManager;
		private var _controller:ProjectAssistController;
		public function ProjectAssistManager()
		{
			if(_instance) throw new Error("实例化单例类出错-ProjectAssistManager");
		}
		
		public static function getIntance():ProjectAssistManager{
			if(!_instance) _instance = new ProjectAssistManager();
			return _instance;
		}
		
		/**
		 *启动 
		 * @param c
		 * 
		 */
		public function start(c:ProjectAssistController):void{
			_controller = c;
			popManager = new WindowManager(c);
			springboardManager = new GoManager(c);
		}
		
		/**
		 *启动FeedRequest
		 * 
		 */
		public function startFeedRequest():void{
			if(!_controller) return;
			startJs();
			feedRequestManager = new FeedRequestManager(_controller as ProjectAssistController);
		}
		
		private function startJs():void{
			jsManager = new JSManager(_controller as ProjectAssistController);
		}
		
		/**
		 * FeedRequest管理器 类
		 */
		public var feedRequestManager:FeedRequestManager;
		/**
		 *js管理器  
		 */
		public var jsManager:JSManager;
		/**
		 * 跳板机管理器
		 */
		public var springboardManager:GoManager;
		/**
		 * 弹窗管理类
		 */
		public var popManager:WindowManager;
	}
}